'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
    async up(queryInterface, Sequelize) {
        const courseArr =[
            {
                categoryId: 1,
                userId: 1,
                name: 'CSS 入门',
                recommended: true,
                introductory: true,
                createdAt: new Date(), updatedAt: new Date()
            },
            {
                categoryId: 2,
                userId: 1,
                name: 'Node.js 项目实践(2025版本)',
                recommended: true,
                introductory: false,
                createdAt: new Date(), updatedAt: new Date()
            },
        ]
        await queryInterface.bulkInsert('Courses', courseArr, {});
    },

    async down(queryInterface, Sequelize) {
        await queryInterface.dropTable('Courses');
    }
};
